﻿#
& "$PSScriptRoot/k4t_锁写log.ps1" '信息：启动dockerd服务，开始1'

#设定
bash -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
systemctl daemon-reload

$private:检查dockerd状态 = & "$PSScriptRoot/___check_dockerd.ps1"
if ($private:检查dockerd状态 -eq $true)
{
	& "$PSScriptRoot/k4t_锁写log.ps1" '错误：dockerd服务已经启动。'
}
else
{
	& "$PSScriptRoot/k4t_锁写log.ps1" '信息：启动dockerd服务，开始2'
	systemctl start docker
	Start-Sleep -Seconds 2
}

$private:检查dockerd状态2 = & "$PSScriptRoot/___check_dockerd.ps1"
if ($private:检查dockerd状态2 -eq $true)
{
	& "$PSScriptRoot/k4t_锁写log.ps1" '信息：启动dockerd服务，完毕'

}
else
{
	& "$PSScriptRoot/k4t_锁写log.ps1" '信息：启动dockerd服务，失败'
}
exit 0

